package com.ysw.wisdomcampus.fragment

import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.ysw.wisdomcampus.LoginActivity
import com.ysw.wisdomcampus.R
import com.ysw.wisdomcampus.kt.navigate
import com.ysw.wisdomcampus.kt.start
import kotlinx.android.synthetic.main.fragment_comprehensive.*

class ComprehensiveFragment : Fragment() {


    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_comprehensive, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        chenji.setOnClickListener {
            navigate(
                it,
                R.id.action_comprehensiveFragment_to_performanceFragment
            )
        }

        kechenbiao.setOnClickListener {
            navigate(
                it,
                R.id.action_comprehensiveFragment_to_subjectFragment
            )
        }

        xingxixiugai.setOnClickListener {
            navigate(
                it,
                R.id.action_comprehensiveFragment_to_personalFragment
            )
        }

        exit.setOnClickListener {
            start(requireContext()) {
                Intent(requireContext(), LoginActivity::class.java)
            }
        }
    }
}